<template>
	<view>
		<u-navbar  title="群成员">
			<view slot="right">
			<image src="/static/message/more.png"  style="margin-right: 32rpx;margin-left: 40rpx;width: 43rpx;height: 10rpx;" @click="fatherClick" ></image>
			</view>
		</u-navbar>
		<view style="height: 30rpx;"></view>
		<!-- 成员列表界面 -->
		<people :list="list" :type="type" ref="mySon" @peopleSubmit="peopleSubmit"></people>
		<!-- 添加弹窗 -->
		<peopleAdd :openPop="openPop" :type="popType"  :list="list" @peopleAddCloseSubmit="peopleAddCloseSubmit"></peopleAdd>
		<!-- 电话提示滑动快 -->
		<movablearea1 :movaheight="movaheightAll" v-if="movableareaShow" @editMovaheightAll="editMovaheightAll" :movaTop="movaTopAll"></movablearea1>
	</view>
</template>

<script>
	import people from '../../components/people/people.vue'
	import peopleAdd from '../../components/peopleAddPop/peopleAddPop.vue'
	export default {
		data() {
			return {
				type:1,
				openPop:false,			//是否打开添加弹窗
				popType:0,				//添加/移除
				// 组织成员
				 list:[
					{
						name:'王小二',
						avatar:'https://cdn.uviewui.com/uview/album/1.jpg',
						checked:true
					},
					{
						name:'王小明',
						avatar:'https://cdn.uviewui.com/uview/album/2.jpg',
						checked:true
					},
					{
						name:'李二',
						avatar:'https://cdn.uviewui.com/uview/album/3.jpg',
						checked:false
					},
					{
						name:'张三',
						avatar:'https://cdn.uviewui.com/uview/album/4.jpg',
						checked:false
					},
					{
						name:'老四',
						avatar:'https://cdn.uviewui.com/uview/album/5.jpg',
						checked:false
					},
					{
						name:'王五',
						avatar:'https://cdn.uviewui.com/uview/album/6.jpg',
						checked:false
					},
					{
						name:'老六',
						avatar:'https://cdn.uviewui.com/uview/album/7.jpg',
						checked:false
					},
					{
						name:'老王',
						avatar:'https://cdn.uviewui.com/uview/album/8.jpg',
						checked:false
					},
					{
						name:'老李',
						avatar:'https://cdn.uviewui.com/uview/album/9.jpg',
						checked:false
					},
				],
			}
		},
		components:{
			people,								//成员列表
			peopleAdd							//添加成员弹窗
		},
		methods: {
			// 父组件调用子组件方法
			fatherClick(){
				 this.$refs.mySon.open();
			},
			peopleSubmit(type){
				// console.log('type',type)
				this.popType = type
				this.openPop = true
			},
			peopleAddCloseSubmit(){
				// console.log('触发了')
				this.openPop = false
			}
		}
	}
</script>

<style>

</style>
